#pragma once
#include "../Objects/GameObject.h"
#include "../../Shaders/Defs/ConstantBuffers.hlsli"
#include "../../EdgeGraphics/ConstantBuffer.h"
class Model;
class Heightmap;

class Terrain : public GameObject
{
	Heightmap* heightmap = nullptr;

public:
	Terrain(Heightmap* heightmap);
	virtual ~Terrain(void);

	/////////////////////<virtual functions>//////////////////////////////////////////

	virtual void Update(float dt) override;

	virtual void Draw(void) override;

	/////////////////////<accessors>//////////////////////////////////////////

	Heightmap* getHeightmap(void) const { return heightmap; }

	virtual ObjectID getID(void) const override { return ObjectID::TERRAIN; }

	/////////////////////<static functions>//////////////////////////////////////////

	static Terrain* createFromHeightmap(Heightmap* heightmap);
};